import request from '@/utils/request'

function addressList() {
  return request({
    url: '/lejuAdmin/companyAddress/addressList'
  })
}

function setSendOne(data) {
  return request({
    url: '/lejuAdmin/companyAddress/setSendOne',
    method: 'post',
    data
  })
}

function setReceiveOne(data) {
  return request({
    url: '/lejuAdmin/companyAddress/setReceiveOne',
    method: 'post',
    data
  })
}

function save(data) {
  return request({
    url: '/lejuAdmin/companyAddress/save',
    method: 'post',
    data
  })
}

function companyAddress(id) {
  return request({
    url: `/lejuAdmin/companyAddress/${id}`
  })
}

function update(data) {
  return request({
    url: '/lejuAdmin/companyAddress/update',
    method: 'post',
    data
  })
}
function del(id) {
  return request({
    url: `/lejuAdmin/companyAddress/${id}`,
    method: 'delete'
  })
}

export {
  addressList,
  setSendOne,
  setReceiveOne,
  save,
  companyAddress,
  update,
  del
}
